package com.wu.exception;

/**
 * @version V1.0
 * @Title: ExceptionCode.java
 * @Description: 通过异常参数枚举
 */
public enum ProjectExceptionEnum implements EnumInterface<String, String,String> {

    /**
     * 登录及账号相关
     **/
    SUCCESS("S000","success", "成功"),
    FAILED("S001","fail", "失败"),
    INVALID("S002", "login expired", "登录失效，请重新登录"),
    ACCESS_DENIED("S003","no permission", "权限不足"),
    SYSTEM_ERROR("S004","systen error", "系统异常"),
    PARAM_VALIDE_FAIL("S005","params error", "参数校验错误"),
    UN_ERROR("S006","unknown error", "未知错误"),
    USER_LOGIN_FAIL("S007","user_login_fail", "用户不存在或密码错误"),

    VERY_NUM_CODE_FAIL("S008","very_num_code_fail","验证失败,请重试"),

    /**
     * 其他
     */

    ;

    /**
     * 错误编号
     */
    private String code;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 错误描述
     */
    private String desc;

    private ProjectExceptionEnum(String code, String msg, String desc) {
        this.code = code;
        this.msg = msg;
        this.desc = desc;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    @Override
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
